1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Processing access_log with PHP script

Discussion in 'Plesk for Linux - 8.x and Older' started by exit15, Jan 23, 2005.

  1. exit15

    exit15 New Pleskian

    Jan 23, 2005
    Likes Received:

    I just moved my osCommerce site from a shared hosting outfit to a VPS / Plesk 7.5. Unfortunately, one of the best utilities I had stopped working as a result. It is a script that parses the access_log on the fly and returns traffic data from search engines by keyword searched. I tried the host's support and search the osCommerce forum, but could not find an answer, Perhaps someone here has an idea.

    Here's what's happening: If we supply the script with the absolute path to the log file it should work. Accordingly I specified the path: /home/httpd/vhosts/domain.com/statistics/logs/access_log - nothing works… I then copied the file access_log to /tmp and to /httpdocs just to test the script using the following paths /home/httpd/vhosts/domain.com/tmp/access_log and /home/httpd/vhosts/domain.com/httpdocs/access_log respectively. The script runs successfully when pointed to /httpdocs.

    I noticed that the permissions on the /statistics are not the same as /httpdocs, so I asked the host to give the ftp user for that domain rights on /statistics... it did not help.

    The error by the way, is the same error one would get when supplying the WRONG path: Warning: gzgets(): supplied argument is not a valid stream resource in.... So I am guessing that somehow the PHP engine or my script cannot read files outside /httpdocs. My previous host had a similar structure, (htdocs and logs) and it worked there. What can the problem be?