This topic is locked
[SOLVED]

 Classified template help with uploading image

3/2/2020 4:34:03 PM
PHPRunner General questions
B
bcritchley author

I have created a brand new project using the "Classified" template. I am building the project locally and then uploading to my web server as usual.
When I go to add a new record the images I try uploading, 54K in size, are not uploading. I have gone through and found the field attributes that points to the file location on the server, which is Windows Server 2012 64 bit using IIS, and hosting a MS SQL Server 2012 database.

In the properties for the picture field I have tried numerous paths to the folder I wish to use, but still am having issues.
I am wanting to store them on the "CS" server in the following path \\cs\c$\inetpub\wwwroot\Projects\GCSDlist\business\Classified\source\files
Might someone be able to give me some idea of what I may have incorrect in my configurations? I haven't changed anything about the template.
Much appreciated in advance.

Sergey Kornilov admin 3/2/2020

This has nothing to do with the Classifieds template.
Web applications run under a limited user account and won't have access to that folder. If you need to upload files to the folder on another server you need to create a network share like \\server\sharename and specify it as an upload path. You also need to make sure that your IIS user has write access to that shared folder.

B
bcritchley author 3/3/2020

I have given the IIS_IUSRS the Modify and Write access with no success? Still am unable to upload a file.

Does anyone have any suggestions on where my stumblng point may be, Makers sense that it's a security issue on th eweb server side, but I am just not sure what permissions for which user I need to modify?

lefty 3/3/2020



I have given the IIS_IUSRS the Modify and Write access with no success? Still am unable to upload a file.

Does anyone have any suggestions on where my stumblng point may be, Makers sense that it's a security issue on th eweb server side, but I am just not sure what permissions for which user I need to modify?


Haven't used the classified template , but since you are uploading images , this might have been done as admin stated above is

did you make permissions on upload folder itself, read and writable ?

B
bcritchley author 3/3/2020



Haven't used the classified template , but since you are uploading images , this might have been done as admin stated above is

did you make permissions on upload folder itself, read and writable and the templates_c directory in PHPrunner output folder writable also?


I'm obviously missing something simple at my end. My project resides at the following location on the web server \\cs\c$\inetpub\wwwroot\Projects\GCSDlist

Within that "GCSDList" project folder I have a directory called "output" along with a directory called "files" These are the 2 directories that have modified and given the IIS_IUSRS account

Modify and Write access. I then rebuilt the project but the images will still not load to the server.

lefty 3/3/2020



I'm obviously missing something simple at my end. My project resides at the following location on the web server \\cs\c$\inetpub\wwwroot\Projects\GCSDlist

Within that "GCSDList" project folder I have a directory called "output" along with a directory called "files" These are the 2 directories that have modified and given the IIS_IUSRS account

Modify and Write access. I then rebuilt the project but the images will still not load to the server. In my case it as easy as just going to that folder on the server right clicking and set permissions to writable.


What happens when you hit upload on an image or file, Any error? Also is field type correct for MSSQL
[font="Arial, Helvetica, sans-serif"][size="2"][color="#1e1e1e"]For just testing to make sure the image upload is working:

[/size]I am on a Windows Server VPS 2016 , When I get a path issue I usually start by trying a path like one up from the project folder ( in your case ../files , relative to where your phprunner project is or one up from project, to make sure it is uploading and make that folder writable on the server. Although this is just for testing . Then If it works I delete that folder ,





I then change the image properties field to absolute path by checking the box absolute path and put the folder outside the root , something like - C:\\home\\mywebsite.com\\files/ and change the directory permissions on the server called "files" from read-only to writable . I haven't had the need to give IIS_IUSRS write access but just make the directory writable as it is located on same server.
Although looking at your path is looks like you are on an Intranet / Shared Server or uploading to another server.
If you are on a Intranet then I guess you would have go with what admin has stated above.





Then If where ever your server is located the administrator should have that information as to where the Windows home folder is or the path to the folder and how to set permissions on that upload folder itself. And if using IIS shared, the info on user permissions.



Just Looking at your path to upload: wouldn't it be

B
bcritchley author 3/4/2020

John and Sergey, thanks so much for the help. I was succesful in finding the error I had after your suggestions.

I was granting the IIS_IUSRS rights but what I neededto do is create the share for the files folder and add the everyone greoup to it for read/write access.

Sergey Kornilov admin 3/4/2020

Well, that was the first thing I mentioned:

you need to create a network share like \\server\sharename